package com.edu.whty.entity.teacherassistant;

import com.edu.whty.common.constants.MsgConstants;

/**
 * 接口返回结果消息
 * @date 2014年12月8日
 */
public class ResultMessage {
	
	private String result; //结果代码
	private String resultMsg; //结果信息
	private Object data; //数据信息
	
	/**
	 * 获取成功消息
	 * @return
	 */
	public static ResultMessage getSuccessResult(){
		ResultMessage resultMessage = new ResultMessage();
		resultMessage.setResult(MsgConstants.SUCCESS_CODE);
		resultMessage.setResultMsg(MsgConstants.SUCCESS_MSG);
		return resultMessage;
	}
	
	/**
	 * 获取失败消息
	 * @return
	 */
	public static ResultMessage getFailedResult(){
		ResultMessage resultMessage = new ResultMessage();
		resultMessage.setResult(MsgConstants.FAILED_CODE);
		resultMessage.setResultMsg(MsgConstants.FAILED_MSG);
		return resultMessage;
	}
	
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public String getResultMsg() {
		return resultMsg;
	}
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	
	
}
